package pikes.peak;

import java.util.Locale;
import java.util.Map;

import org.springframework.web.servlet.i18n.LocaleChangeInterceptor;

public class CookieLocaleURIParameter extends URIParameterBuilder {

	private Locale locale = null;

	public CookieLocaleURIParameter(final Locale locale) {
		this.locale = locale;
	}

	@Override
	protected final void build(Map<CharSequence, CharSequence> parameters) {
		parameters.put(LocaleChangeInterceptor.DEFAULT_PARAM_NAME, locale.getLanguage() + "_" + locale.getCountry());
	}

}
